import Koa from 'koa';

import userRouter from './user';
import postRouter from './post';
import uploadRouter from './upload';

const router = (app: Koa) => {
  app.use(userRouter.routes()).use(userRouter.allowedMethods());
  app.use(postRouter.routes()).use(userRouter.allowedMethods());
  app.use(uploadRouter.routes()).use(uploadRouter.allowedMethods());
};

export default router;
